home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
glass
/
glass.lha
/
GLASS
/
contsens
/
Readme
< prev
next >
Wrap
Text File
|
1991-01-31
|
5KB
|
114 lines
version 2.3:
------------
The Pascal programs have been translated to C, using the program p2c;
separate compilation is used.
Subsequently, the abstract syntax handling has been rewritten to use
tmc. Error messages are now sent to stderr; if no type errors
are found the modified abstract syntax goes to stdout. The correct exitcode
is delivered.
Programs:
csf does the less severe context-sensitive checks, on the parser output
If -w is given as argument, warnings are treated as errors.
sk does the severe context-sensitive checks, on the output of the
macro-expander
Overview of files:
handlefull.ht } Fed to tm for access procs. for full language: fscan, print,
.ct } new. Use fullconf.t (wantdefs)
handlekex.ht } Fed to tm for access procs. for extension of kernel language
.ct } (in kex.ds): fscan, print, new, app. Use kexconf.t
handcom.h: access for primitives in ds; inserted in xxx.ht
.c: inserted in xxx.ct
kex.ds: data structure for communication from macro expander to sk
check.ds.h: type defs. for implementation type, name-type list, errorlist,
nminstrec.
check.var.h: global vars. used in contsens.c and size.c
check.afuncs.h: build instances of the implementation type
.c
errorenv.h: generate/print error messages; operations on name-type lists
.c
unification.h: substitution on implementation types so that they represent the
.c: same same/have nonempty intersection, applying subst., tests
contsens.h: binding/scoping checks, less severe type checks, binding/type
.c: dependant simple data structure transformations
mainf.c: invokes the previous (with or without warnings)
size.h: severe type checks, i.e. size checks + rewriting cons/indexing
.c: to kernel Glass (depends on types)
mainsk.c: invokes the previous
p2c.h: }needed because these programs have been translated from Pascal
p2clib.c }
version 2.2:
------------
The check if tuples have exactly the right size is implemented: the
program sk. This should be applied to the output of the macro-expander,
and delivers errormessages or abstract syntax fit for argument to semantic
functions (remaining : and index expressions have been rewritten).
version 2.1:
-----------
Simple context-sensistive checks have been implemented: ensuring that a type
is correct after writing out typenamings, and that atomic typenames and type
variables are only used where allowed, checking that no names are defined more
than once.
Some checks result in warnings (less severe than errors, in the message
indicated by '(W)').
The clarity of type error messages has been considerably improved (I hope),
by e.g. printing the piece of Glass text for which a wrong type was discovered.
To be able to run on machines that do not know separate compilation, a flag
'SEPCOMP' is introduced in the makefile. If set to zero (the default when you
receive this package) all source files are merged into one big file first by
cpp, and 'external' functions, and 'argv' and 'argc' (for reading an option)
are not used.
A drawback is that I do not know how to give a correct exit code to csfe/csfw
without 'external' declarations, so that no exit code is given.
SEPCOMP=1: 'external', 'argv' and 'argc' are used. So csfe/csfw give correct
exit code. csfe can be given an optional argument '-w'; 'csfe -w' is equivalent
to csfw.
Executables:
csfe: do context-sensitive checks, give errors only.
csfw, csfe -w: treat warning like they were errors.
Yet to be implemented, so you'll have to take care of this for the moment
yourself:
- use ':' only for lists that are broken into pieces by the macro-expander
(':' not accepted in the kernel).
- in using 't^e' types, be sure that 'e' has the right size (since the full
Glass type check can not know the value of 'e' yet)
version 2.0:
-----------
Not all tasks have been implemented yet, but at least the type-correctness
of a full GLASS description is checked. The other tasks will be implemented
in the near future.
Because of the yet unimplemented tasks, the user for the moment will have to
take care of the following things himself:
- if using typenamings, be sure that after the defined typename has been
replaced by its definition there results a correct type. (e.g. do not use
't => B' with 'TYPE t = INT')
- in a DEF that ends up in the kernel (i.e. one without formal parameters)
use a typename only where one is allowed in the kernel (so e.g. not as
parametertype, and not with a functiontype as definition).
- don't define names more than once: in a list of 'elt's, in the parameters
of a DEF/MAC, in the '-:' declarations in one type.
- use ':' only for lists that are broken into pieces by the macro-expanded
(':' not accepted in the kernel).
- in using 't^e' types, be sure that 'e' has the right size (since the full
Glass type check can not know the value of 'e' yet)
The executable program is called 'csf'. It takes input from stdin, and produces
output on stdout. Input: an instance of '[def]', as produced by the parser;
output: if errors occur errormessages, otherwise the input modified such
that it is fit as input for the macro-expander.
csf can be activated with the option '-w'. In that case some more severe tests
are done (possibly generating warnings), which are treated like errors. If csf
is used without '-w' these warnings are ignored.